<template>
  <div class="app-container" style="width: 40%">
    <el-form ref="form" :model="repairInfo" label-width="80px">

      <el-form-item label="车  牌  号" label-width="100px" >
        <el-input v-model="repairInfo.carNo" readonly style="border: none"></el-input>
      </el-form-item>

      <el-form-item label="修   理   厂" label-width="100px">
        <el-input v-model="repairInfo.unitName" readonly></el-input>
      </el-form-item>

      <el-form-item label="送修时间" label-width="100px">
        <el-input v-model="repairInfo.sendTime"  type="date" readonly></el-input>
      </el-form-item>


<!--      <el-form-item label="送修时间" label-width="100px" >-->
<!--        <div class="block"  label-width="80px">-->
<!--          <el-date-picker-->
<!--            v-model="repairInfo.sendTime"-->
<!--            type="date"-->
<!--            placeholder="选择日期时间" readonly>-->
<!--          </el-date-picker>-->
<!--        </div>-->
<!--      </el-form-item>-->

      <el-form-item label="预计取车时间" label-width="100px">
        <el-input v-model="repairInfo.estimateTime"  type="date" readonly></el-input>
      </el-form-item>

<!--      <el-form-item label="预计取车时间" label-width="100px" >-->
<!--        <div class="block"  label-width="80px">-->
<!--          <el-date-picker-->
<!--            v-model="repairInfo.estimateTime"-->
<!--            type="date"-->
<!--            placeholder="选择日期时间" readonly>-->
<!--          </el-date-picker>-->
<!--        </div>-->
<!--      </el-form-item>-->

      <el-form-item label="送修原因:" label-width="100px">
        <el-input v-model="repairInfo.sendReason" readonly style="outline: none" ></el-input>
      </el-form-item>

      <el-form-item label="送修备注" label-width="100px">
        <el-input v-model="repairInfo.sendRemarks" readonly></el-input>
      </el-form-item>

      <el-form-item label="经 办 人" label-width="100px">
        <el-input v-model="repairInfo.rname" readonly></el-input>
      </el-form-item>

<!--      <el-form-item label="经 办 人" label-width="100px">-->
<!--        <el-select  v-model="repairInfo.rname"  placeholder="请选择经办人" label-width="80px" readonly>-->
<!--          <el-option-->
<!--            v-for="(usitem,usindex) in usersList"-->
<!--            :key="usindex"-->
<!--            :label="usitem.rname"-->
<!--            :value="usitem.id">-->
<!--          </el-option>-->
<!--        </el-select>-->
<!--      </el-form-item>-->

      <el-form-item label="经 办 人" label-width="100px">
        <el-input v-model="repairInfo.repairOption" readonly></el-input>
      </el-form-item>

<!--      <el-form-item label="维修类别" label-width="100px">-->
<!--        <el-select  v-model="repairInfo.repairType"  placeholder="维修类别" label-width="80px" readonly>-->
<!--          <el-option-->
<!--            v-for="(uitem,uindex) in repairTypeList"-->
<!--            :key="uindex"-->
<!--            v-if="(uitem.pid ===39)&&(uitem.isdisable == 1)"-->
<!--            :label="uitem.text"-->
<!--            :value="uitem.id">-->
<!--          </el-option>-->
<!--        </el-select>-->
<!--      </el-form-item>-->

      <el-form-item label="预计取车时间" label-width="100px">
        <el-input v-model="repairInfo.getTime"  type="date" readonly></el-input>
      </el-form-item>


<!--      <el-form-item label="取车时间"  label-width="100px">-->
<!--        <div class="block"  label-width="80px">-->
<!--          <el-date-picker-->
<!--            v-model="repairInfo.getTime"-->
<!--            type="date" readonly>-->
<!--          </el-date-picker>-->
<!--        </div>-->
<!--      </el-form-item>-->

      <el-form-item label="花费金额:" label-width="100px">
        <el-input v-model="repairInfo.repairCost" readonly></el-input>
      </el-form-item>

      <el-form-item label="维修项目" label-width="100px">
        <el-input v-model="repairInfo.repairOption" readonly></el-input>
      </el-form-item>
      <el-form-item label="使用材料" label-width="100px">
        <el-input v-model="repairInfo.useStuff" readonly></el-input>
      </el-form-item>
      <el-form-item label="取车备注" label-width="100px">
        <el-input v-model="repairInfo.getRemarks" readonly></el-input>
      </el-form-item>

      <el-form-item>
        <el-button type="success" @click="returnList()">返回</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import api_repair from "@/api/repair_record.js";
export default {
  name: "detail_repair_record",
  data() {
    return {
      repairInfo: {},
    }
  },
  created() {
    const id = this.$route.params.id;
    this.getById(id);
  },
  methods: {
    getById(id){
      api_repair.detail(id)
        .then(Response => {
          this.repairInfo = Response .data.repairInfo
        })
    },

    returnList(){
      this.$router.push({path: "/daily_work/repair_record"});
    }
  }
}

</script>
<style>
</style>
